package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import java.math.BigDecimal;
import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.CompanySaleUserExample.E_COMPANY_ID;
import static org.jsola.hr.example.CompanySaleUserExample.E_DIVIDED_PROPORTION;
import static org.jsola.hr.example.CompanySaleUserExample.E_REBATES_RULES_ID;
import static org.jsola.hr.example.CompanySaleUserExample.E_REMARK;
import static org.jsola.hr.example.CompanySaleUserExample.E_SALE_NAME;
import static org.jsola.hr.example.CompanySaleUserExample.E_SALE_USER_ID;
import static org.jsola.hr.example.CompanySaleUserExample.M_COMPANY_ID_MAX;
import static org.jsola.hr.example.CompanySaleUserExample.M_COMPANY_ID_NOT_NULL;
import static org.jsola.hr.example.CompanySaleUserExample.M_REBATES_RULES_ID_MAX;
import static org.jsola.hr.example.CompanySaleUserExample.M_REMARK_MAX;
import static org.jsola.hr.example.CompanySaleUserExample.M_SALE_NAME_MAX;
import static org.jsola.hr.example.CompanySaleUserExample.M_SALE_NAME_NOT_NULL;
import static org.jsola.hr.example.CompanySaleUserExample.M_SALE_USER_ID_MAX;
import static org.jsola.hr.example.CompanySaleUserExample.M_SALE_USER_ID_NOT_NULL;
import static org.jsola.hr.example.CompanySaleUserExample.N_COMPANY_ID;
import static org.jsola.hr.example.CompanySaleUserExample.N_DIVIDED_PROPORTION;
import static org.jsola.hr.example.CompanySaleUserExample.N_REBATES_RULES_ID;
import static org.jsola.hr.example.CompanySaleUserExample.N_REMARK;
import static org.jsola.hr.example.CompanySaleUserExample.N_SALE_NAME;
import static org.jsola.hr.example.CompanySaleUserExample.N_SALE_USER_ID;

/**
 * 用工单位销售
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【用工单位销售】的参数")
@Data
public class CompanySaleUserAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_COMPANY_ID, example = E_COMPANY_ID, required = true)
    @NotNull(message = M_COMPANY_ID_NOT_NULL)
    @Length(max = 32, message = M_COMPANY_ID_MAX)
    private String companyId;

    @ApiModelProperty(notes = N_SALE_USER_ID, example = E_SALE_USER_ID, required = true)
    @NotNull(message = M_SALE_USER_ID_NOT_NULL)
    @Length(max = 32, message = M_SALE_USER_ID_MAX)
    private String saleUserId;

    @ApiModelProperty(notes = N_REBATES_RULES_ID, example = E_REBATES_RULES_ID)
    @Length(max = 32, message = M_REBATES_RULES_ID_MAX)
    private String rebatesRulesId;

    @ApiModelProperty(notes = N_SALE_NAME, example = E_SALE_NAME, required = true)
    @NotNull(message = M_SALE_NAME_NOT_NULL)
    @Length(max = 50, message = M_SALE_NAME_MAX)
    private String saleName;

    @ApiModelProperty(notes = N_DIVIDED_PROPORTION, example = E_DIVIDED_PROPORTION)
    private BigDecimal dividedProportion;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 255, message = M_REMARK_MAX)
    private String remark;


}

